<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: inline-block;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>

    <script src="./12-红绿灯.js"></script>
    <script>
        let l1 = new Light('.box1')
        l1.init()
        let l2 = new Light('.box2')
        l2.init()
        l2.autoPlay()
        let l3 = new Light('.box3')
        l3.init()
        l3.updownClick()
    </script>
</body>
</html>